<template>
  <div style="margin-left: -10px;">
    <el-row :gutter="20">
      <!-- 去年新增员工 -->
      <el-col :span="4">
        <div>
          <el-statistic
              :title="title1"
              :value="value1"
              decimal-separator="."
              group-separator=","
          >
          </el-statistic>
        </div>
      </el-col>
      <!-- 今年新增员工 -->
      <el-col :span="4">
        <div>
          <el-statistic :title="title2" :value="value2"></el-statistic>
        </div>
      </el-col>
      <!-- 本月新增员工 -->
      <el-col :span="5">
        <div>
          <el-statistic
              :title="title3"
              :value="value3"
          >
          </el-statistic>
        </div>
      </el-col>
      <!-- 去年最受欢迎的项目 -->
      <el-col :span="6">
        <div>
          <el-statistic :title="title4" :value="value4">
          </el-statistic>
        </div>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  name: "TextTable",
  data() {
    return {
      title1: "去年新增员工",
      title2: "今年新增员工",
      title3: "本月新增员工",
      title4: "本月离职员工",
      title5: "获赞数量",
      value1: 0,
      value2: 0,
      value3: 0,
      value4: "",
      value5: 0,
    };
  },
  methods: {
    getDataList() {
      this.$http.post("/count/TextTable").then((res) => {
        this.value1 = res["lastYear"];
        this.value2 = res["thisYear"];
        this.value3 = res["thisMonth"];
        this.value4 = res["thisMonthLiZhi"];
        // this.value5 = res["scoreNumber"];
        // this.data = res;
      });
    },
  },
  mounted() {
    this.getDataList()
  },
};
</script>

<style lang="less">

.test {
  //边框效果
  //border: 1px solid black;
}
</style>
